package cn.jinhe.doc.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.jinhe.doc.base.DaoSupportImpl;
import cn.jinhe.doc.domain.Plan;
import cn.jinhe.doc.domain.Step;
import cn.jinhe.doc.service.StepService;
@Service
@Transactional
@SuppressWarnings("unchecked")
public class StepServiceImpl extends DaoSupportImpl<Step> implements StepService{

	@Override
	public List<Step> findByPlan(Plan plan) {
		// TODO Auto-generated method stub
		return getSession().createQuery(//
				"FROM Step s WHERE s.plan=? ")
				.setParameter(0, plan)
				.list();
		}
	}


